trigger trgOnBeforeInsert on ENT_2__Entitlements_Settings__c (before insert,before update) {
	if (trigger.isInsert) {
    	List<Entitlements_Settings__c> previousESSet = new List<Entitlements_Settings__c>( [Select Id From Entitlements_Settings__c] );
    	delete previousESSet;
	}
    
    // Blank out any value other than 'yes'
    try {
    	if (trigger.new[0].TempDisableCaseTriggers__c.toLowerCase() == 'yes')
    		trigger.new[0].TempDisableCaseTriggers__c = 'yes';
    	else
    		trigger.new[0].TempDisableCaseTriggers__c = '';
    } catch(Exception e) {
    	trigger.new[0].TempDisableCaseTriggers__c = '';
    }
}